# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-vatnumber
_pkgname=vatnumber
pkgver=1.2
pkgrel=7
pkgdesc="A Python module to validate VAT numbers"
options="!check" # Requres unpackaged 'suds'
url="https://pypi.org/project/vatnumber/"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-python-stdnum"
makedepends="py3-setuptools"
checkdepends="py3-pysimplesoap"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
	py3.patch
	"

builddir="$srcdir"/$_pkgname-$pkgver

build() {
	2to3 -w vatnumber
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
708b73f8d059638c165663f8b36dd8602c0aa857be456e50690dd61c09b9a8a2e560bf2a3ed89a790670c93f5b84c5a391cef748bebf0fa978a6fe5e319a541f  vatnumber-1.2.tar.gz
74339ae600e1745ffbcd9c75ebcccbfe2f2a9cc33f5cfcecfa446ac59284dbfcc7e2db9001e86b6bef6677c37e4d27b371fdfef86e1eba23c2b7659ad5281f24  py3.patch
"
